import type { RouteRecordRaw } from 'vue-router'

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import('@/pages/home/index.vue')
  },
  {
    path: '/worth',
    name: 'Worth',
    component: () => import('@/pages/worth/index.vue')
  },
  {
    path: '/center',
    name: 'Center',
    component: () => import('@/pages/center/index.vue')
  },
  {
    path: '/category',
    name: 'Category',
    component: () => import('@/pages/category/index.vue')
  },
  {
    path: '/cart',
    name: 'Cart',
    component: () => import('@/pages/cart/index.vue')
  },
  {
    path: '/search',
    name: 'Search',
    component: () => import('@/component/search/index.vue')
  },
  {
    path: '/detail:id',
    name: 'Detail',
    component: () => import('@/page/detail/index.vue')
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/pages/login/index.vue')
  },
  {
    path: '/404',
    name: 'Error',
    component: () => import('@/pages/error/index.vue')
  },
  {
    path: '/*',
    redirect: '/404'
  }
]
export default routes
